var class_num=location.search;
class_num=class_num.split('?')[1];
$('#href_index').attr('href','course.html?'+class_num);
$('#href_message').attr('href','message.html?'+class_num);
$('#me').attr('href','me.html?'+class_num);
if (islogin()) {
    $.post({
        url:'../../requests/student/select_notice.php',
        data:{'class':class_num},
        success:function (data) {
            for (var i = 0; i < data.length; i++) {
                    var dom=" <div class=\"content-block-title\">"+data[i].time+"</div>\n" +
                        "                <div class=\"card\">\n" +
                        "                    <div class=\"card-header\">\n" + data[i].title+
                        "                    </div>\n" +
                        "                    <div class=\"card-content\">\n" +
                        "                        <div class=\"card-content-inner\">\n" +data[i].detail+
                        "                        </div>\n" +
                        "                    </div>\n" +
                        "                </div>";
                $('.cards-list').append(dom);
            }
        }
    });

}
else window.location.href='../../index.html';